﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace dayattheraces
{
    public class Bet 
    {    
        public int Amount; // The amount of cash that was bet    
        public int Dog; // The number of the dog the bet is on    
        public Guy Bettor; // The guy who placed the bet

        public string GetDescription()
        {
            if (Amount != 0)
            {
                return Bettor.Name + " bets $" + Amount + " on Dog #" + Dog;
                
            }
            else
                return "no bet yet";
            
            // Return a string that says who placed the bet, how much      
            // cash was bet, and which dog he bet on ("Joe bets 8 on      
            // dog #4"). If the amount is zero, no bet was placed      
            // ("Joe hasn’t placed a bet").
           
         

        }

        public int PayOut(int Winner) 
         {
             if (Dog == Winner)
             {
                 return Amount;
             }
             else
             {
                 return -Amount;
             }
            // The parameter is the winner of the race. If the dog won,      
       // return the amount bet. Otherwise, return the negative of      
       // the amount bet. 
            
         } 
    }

}
